public class Singleton2 {
    private Singleton2(){

    }

    private static Singleton2 instance;

    public static Singleton2 getInstance(){
        if (null == instance){
            instance = new Singleton2();
        }
        return instance;
    }
}
